/* eslint-disable */
// 该文件由 OneAPI 自动生成，请勿手动修改！
import { request } from '@umijs/max';

/** 此处后端没有提供注释 GET /api/v1/queryUserList */
export async function queryUserList(
  params: {
    // query
    /** keyword */
    keyword?: string;
    /** current */
    current?: number;
    /** pageSize */
    pageSize?: number;
  },
  options?: { [key: string]: any },
) {
  return request<API.Result_PageInfo_UserInfo__>('/api/v1/queryUserList', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /api/v1/user */
export async function addUser(
  body?: API.UserInfoVO,
  options?: { [key: string]: any },
) {
  return request<API.Result_UserInfo_>('/api/v1/user', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /api/v1/user/${param0} */
export async function getUserDetail(
  params: {
    // path
    /** userId */
    userId?: string;
  },
  options?: { [key: string]: any },
) {
  const { userId: param0 } = params;
  return request<API.Result_UserInfo_>(`/api/v1/user/${param0}`, {
    method: 'GET',
    params: { ...params },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 PUT /api/v1/user/${param0} */
export async function modifyUser(
  params: {
    // path
    /** userId */
    userId?: string;
  },
  body?: API.UserInfoVO,
  options?: { [key: string]: any },
) {
  const { userId: param0 } = params;
  return request<API.Result_UserInfo_>(`/api/v1/user/${param0}`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...params },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 DELETE /api/v1/user/${param0} */
export async function deleteUser(
  params: {
    // path
    /** userId */
    userId?: string;
  },
  options?: { [key: string]: any },
) {
  const { userId: param0 } = params;
  return request<API.Result_string_>(`/api/v1/user/${param0}`, {
    method: 'DELETE',
    params: { ...params },
    ...(options || {}),
  });
}

/** 获取数据 */
export async function getProjectList(
  params: {},
  options?: { [key: string]: any },
) {
  return request<API.Result_string_>(`../tc_all/api/admin/project/list`, {
    method: 'GET',
    params: { ...params },
    ...(options || {}),
  });
}
/** 上传 */
export async function publicUpload(body: any, options?: any) {
  return request<API.Result_string_>(`tc_file/api/file_upload`, {
    method: 'POST',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data: body,
    ...(options || {}),
  });
}
/** 文本翻译 */
export async function getTranslation(
  params: {},
  options?: { [key: string]: any },
) {
  return request<API.Result_string_>(`/tc_ai/api/translation/get`, {
    method: 'GET',
    params: { ...params },
    ...(options || {}),
  });
}
/** 文件翻译列表
 *   //http://c8smn5.natappfree.cc/api/api/fileTranslateInfo/getFileList?userKey=4466
 */
export async function getTranslateList(
  params: {},
  options?: { [key: string]: any },
) {
  return request<API.Result_string_>(
    `/tc_translateFile/api/api/fileTranslateInfo/getFileList`,
    {
      method: 'GET',
      params: { ...params },
      ...(options || {}),
    },
  );
}
/** 文件翻译  */
export async function getUploadFileUrl(
  params: {},
  options?: { [key: string]: any },
) {
  return request<API.Result_string_>(
    `/tc_translateFile/api/api/fileTranslateInfo/uploadFileUrl`,
    {
      method: 'GET',
      params: { ...params },
      ...(options || {}),
    },
  );
}


/** 用户登录（密码登录、图片验证码）  */
export async function getAuthLogin(
  body?: any,
  options?: { [key: string]: any },
) {
  return request<any>(`/all_api/bus/auth/login`, {
    method: 'POST',
    // headers: {
    //   'Content-Type': 'application/json',
    // },
    data: body,
    ...(options || {}),
  });
}
/** 设置密码（首次登陆）  */
export async function resetPassWord(
  body?: any,
  options?: { [key: string]: any },
) {
  return request<any>(`/all_api/bus/auth/resetPassWord`, {
    method: 'POST',
    // headers: {
    //   'Content-Type': 'application/json',
    // },
    data: body,
    ...(options || {}),
  });
}
/** 修改用户密码  */
export async function updatePassWord(
  body?: any,
  options?: { [key: string]: any },
) {
  return request<any>(`/all_api/bus/auth/updatePassWord`, {
    method: 'POST',
    // headers: {
    //   'Content-Type': 'application/json',
    // },
    data: body,
    ...(options || {}),
  });
}
/** 用户信息  */
export async function getAuthInfo(
  params?: {},
  options?: { [key: string]: any },
) {
  return request<any>(
    `/all_api/bus/auth/infos`,
    {
      method: 'GET',
      params: { ...params||{} },
      ...(options || {}),
    },
  );
}

/** 用户菜单 */
export async function getAuthMenuList(
  params: {},
  options?: { [key: string]: any },
) {
  return request<any>(
    `/all_api/bus/auth/menuList`,
    {
      method: 'GET',
      params: { ...params },
      ...(options || {}),
    },
  );
}

/** 退出 */
export async function logout(
  params?: {},
  options?: { [key: string]: any },
) {
  return request<any>(
    `/all_api/bus/auth/logout`,
    {
      method: 'GET',
      params: { ...params },
      ...(options || {}),
    },
  );
}

/** 用户收藏-查询列表数据 */
export async function getSysUserCollectList(
  params?: {},
  options?: { [key: string]: any },
) {
  return request<any>(
    `/all_api/bus/sysUserCollect/list`,
    {
      method: 'GET',
      params: { ...params },
      ...(options || {}),
    },
  );
}

/** 用户收藏-新增数据  */
export async function sysUserCollect(
  body: any,
  options?: { [key: string]: any },
) {
  return request<any>(`/all_api/bus/sysUserCollect`, {
    method: 'POST',
    // headers: {
    //   'Content-Type': 'application/json',
    // },
    data: body,
    ...(options || {}),
  });
}
/** 用户收藏-取消收藏  */
export async function deletesysUserCollect(
  params?: {},
  options?: { [key: string]: any },
) {
  return request<any>(`/all_api/bus/sysUserCollect`, {
    method: 'DELETE',
    params: { ...params },
      ...(options || {}),
  });
}

/** 钉钉用户登录测试 */
export async function loginDingDing(
  params?: any,
  options?: {},
) {
  return request<any>(
    `/all_api/bus/auth/loginDingDing`,
    {
      method: 'GET',
      params: { ...params },
      ...(options || {}),
    },
  );
}